﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo
{
    [NHibernateEntity(Table = "apl_EntityActions")]
    public class EntityAction
    {
        public EntityAction() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }

        [Property]
        public virtual string Code { get; set; }

        [Property]
        public virtual string IconPath { get; set; }

        [Property]
        public virtual EntityActionApplicability Applicability { get; set; }
        
        [BelongsTo(Column = "ID_Entity")]
        public virtual Entity Entity { get; set; }
    }

    public enum EntityActionApplicability { 
        Global = 1,
        List = 2,
        ListSelected = 3,
        Edit = 4
    }
}
